package org.mentalsmash.tazio.transactions.objects;

import java.io.Serializable;

import org.mentalsmash.tazio.commons.identifiers.OID;

public interface Snapshot extends Serializable {

    /**
     * Returns the object identifier of the Transactional Object represented by
     * this snapshot
     * 
     * @return an {@link OID}
     */
    OID getOID();

    /**
     * Returns the version that the TransactionalObject had when the snapshot
     * was taken.
     * <p>
     * It is equals to the sequence number of the last transaction that modified
     * that object
     * </p>
     * 
     * @return the version that the TransactionalObject had when the snapshot
     *         was taken.
     */
    long getInitialVersion();

    /**
     * Returns <code>true</code> if it is an instance of <tt>SetSnapstho</tt>
     * 
     * @return <code>true</code> if it is an instance of <tt>SetSnapstho</tt>
     */
    boolean isSetSnapshot();

}